let ListNode =+function(){
	this.left = null;
	this.vav = null;
	this.lenth = 0;
};
let Node = function(){
	this.vav = val;
	this.next = null;
};
// 增加
function add(val) {
    const nodes = new Node(val);
    this.nav = nodes;
    const right = this.nav;
    if (!this.left) {
        this.left = nodes;
        this.left.next = null;
    }
	if (right) {
	    right.next = this.nav;
	}
    this.length++;
};
//删除
function delete(val) {
    let first = new ListNode()//设置虚拟头
    let cur = first
    first.next = left
    while (left) {
        if (left.val != val) {
            left = left.next
        } else if(left.val == val){
            cur.next = left
            cur = left
            left = left.next
        }
    }
    cur.next = left
    return first.next

};
//查找 return cur或者null 
function find(val){
  let cur = this.first
  while(cur && cur.val){
    if(cur.val == val){
      console.log(cur)
    }
    cur = cur.next 
  }
  console.log(null)
};
// 修改
function change(val,nodes){
  let cur = this.find(val)

  if(!cur){
    console.log("不存在该元素!")
  }
  else{
    cur.val = nodes
  }
};